package team.seekers.catering.common.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;
import lombok.Getter;

import java.util.Arrays;

/**
 * 反馈状态枚举
 */
@Getter
public enum EatLogTypeEnum implements IEnum<Integer> {
    BREAKFAST(0, "早餐"),
    LAUNCH(1, "午餐"),
    DINNER(2, "晚餐"),
    MORE(3, "加餐"),
    ;

    private int status;

    private String name;

    EatLogTypeEnum(int status, String name) {
        this.status = status;
        this.name = name;
    }

    @Override
    public Integer getValue() {
        return this.status;
    }

    public static EatLogTypeEnum getByStatus(int status) {
        return Arrays.stream(values()).filter(e -> e.getStatus() == status).findFirst().orElse(null);
    }
}
